<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        @keyframes homework1{
            0%{
               transform: translateX(-200px);
            }
            50%{
                transform: translateX(-400px);
            }
            100%{
                transform: translateX(0px);
            }
        }
       *{
        padding: 0;
        margin: 0;
       }
        .homework1{
            width: 200px;
            height: 150px;
            border: 1px solid black;
            border-radius: 5px;
            overflow: hidden;
            white-space: nowrap;
            margin: 10px;
        }
        .homework1 .box1,.box2,.box3{
            width: 200px;
            height: 150px;
            font-size: 30px;
           text-align: center;
           box-sizing: border-box;
           padding-top: 45px;
        }
        .homework1 .box1{
            
            background-color: red;
            display: inline-block;
            animation: homework1 3s infinite alternate;
        }
        .homework1 .box2{
           
            background-color: green;
            display: inline-block;
            margin: -5px;
            animation: homework1 3s infinite alternate;
        }
        .homework1 .box3{
        
            background-color: blue;
            display: inline-block;
            animation: homework1 3s infinite alternate;
        }
        .homework2{
            width: 200px;
            height: 10px;
            background-color: gray;
            margin: 10px;
        }
        .homework2 .box1{
            background-color: black;
            width: 0%;
            height: 100%;
            animation: homework2 3s infinite normal;
        }
        @keyframes homework2{
            from{
                width: 0;
            }
            to{
                width: 100%;
            }
        }
        .hw3{
            width: 200px;
            height: 20px;
            margin: 10px;
            border-radius: 10px;
            background:linear-gradient(90deg,pink ,skyblue);
            position: relative;
        }
        .hw3 .box{
            width: 200px;
            height: 20px;
            background-color: white;
            position: absolute;
            
            animation: hw3 3s infinite normal;
        }
        
        @keyframes hw3{
            from{
                right: 0px ;
            }
            to{
                right:-200px;
            }
        }
        .hw4{
            width: 200px;
            height: 20px;
            margin: 10px;
            border-radius: 10px;
            overflow: hidden;
            background: repeating-linear-gradient(-45deg, gray,gray 10px,black 10px,black 20px);
            position: relative;
        }
        .hw4 .box{
            width: 200px;
            height: 20px;
            background: repeating-linear-gradient(-45deg,red,red 10px,orange 10px,orange 20px);
            position: absolute;
            animation: hw4 2s  infinite normal;
        }
        @keyframes hw4{
            from{
            left: -200px;
            
            }
            to{
             left: 0;
               
            }   
        }
        .hw5{
            width: 200px;
            height: 20px;
            background: repeating-linear-gradient(90deg, white,white 10px,gray 10px,gray 20px);
        }
        .hw5 .box{
            width: 200px;
            height: 20px;
            background: repeating-linear-gradient(90deg, white,white 10px,black 10px,black 20px);
            animation: hw5 2s steps(11) infinite normal;
        }
        @keyframes hw5{
            from{
          width: 0;
            
            }
            to{
             width: 220px;
               
            }   
        }
    </style>
</head>
<body>
    <div class="homework1">
        <div class="box1"><p>red</p></div>
        <div class="box2"><p>green</p></div>
        <div class="box3"><p>blue</p></div>
    </div>
    <div class="homework2">
        <div class="box1"></div>
    </div>
    <div class="hw3">
        <div class="box"></div>
    </div>
    <div class="hw4">
        <div class="box">
            
        </div>
       
    </div>
    <div class="hw5">
        <div class="box"></div>
    </div>
</body>
</html>